<template>
  <div class="date-picker">
    <date-picker
    :years="years"
    :current-date="currentDate"
    @date-change=handleDateChange
    ></date-picker>
  </div>
</template>
<script setup lang="ts" >
/**
 * 1. scroll-container =>组件
 * ==> 嵌入 =》list-item=>组件
 * 2.出口组件 date-picker =》组件
 * 
 * 工具函数 日数组，月数组
 * 类型文件
 */
import DatePicker from '../components/date-picker/index.vue'

const years = [2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
  2012, 2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024
]
const currentDate = [2021,2,15]
function handleDateChange(currentDate: number[]) {
  console.log(currentDate)
}
</script> 